<!DOCTYPE HTML>
<html>
<head>
<title>#AllowSameLineComments | AutoHotkey</title>
<meta name="description" content="The #AllowSameLineComments directive allows a comment to appear on the same line as a command (only for AutoIt v2 scripts)." />
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>#AllowSameLineComments</h1>

<p class="warning"><span class="ver">[v1.1.09+]</span>: <strong>该指令已被移除.</strong> 不再支持 AutoIt.</p>

<p>仅适用于 AutoIt v2(.aut) 脚本: 允许注释和命令在同一行.</p>

<pre class="Syntax"><span class="func">#AllowSameLineComments</span></pre>
<p>在任何 AutoIt v2(.aut) 脚本的 <strong>顶部</strong> 指定此指令会启用同行注释, 出于兼容性的考虑正常情况下这个功能是禁用的. 如果在脚本顶部外的其他地方使用, 那么在使用此指令后才支持同行注释.</p>
<h2>示例</h2>
<pre class="NoIndent">#AllowSameLineComments
Sleep, 1  <em>; 此注释是同行注释.</em></pre>

</body>
</html>